@extends('admin.index')
@section('con')
    @include('common.message')
    @include('common.delete')
    <ol class="breadcrumb">
        <li class="active">添加</li>
        <li class="active">政治</li>
        <li class="active">选择题</li>
    </ol>
    <a href="{{ url('admin/polity/choice/create') }}" class="btn btn-primary btn-block" style="margin-bottom: 20px;">新增</a>
    @foreach($data as $v)
        <div class="alert alert-success alert-dismissible animated flipInX" role="alert" style="text-align: left;">
            <h4><i class="fa fa-question-circle"></i> {{ $v->title }}</h4>
            <p style=" text-indent:2em"><b>A.</b> {{ $v->option_a }}</p>
            <p style=" text-indent:2em"><b>B.</b> {{ $v->option_b }}</p>
            <p style=" text-indent:2em"><b>C.</b> {{ $v->option_c }}</p>
            <p style=" text-indent:2em"><b>D.</b> {{ $v->option_d }}</p>
            <p style="margin-bottom: 10px;">正确答案：<b>{{ $v->answer }}</b>
            </p>
            <button class="btn btn-danger" onclick="del('{{ url('admin/polity/choice/'.$v->id) }}')">删除</button>
            <a href="{{ url('admin/polity/choice/'.$v->id.'/edit') }}" class="btn btn-default">修改</a>
        </div>
    @endforeach
    {{ $data->links() }}
@endsection